package com.sj.parksdk.net.result.databean;

import com.sj.parksdk.net.base.Page_Data;
import com.xuexiang.xutil.common.StringUtils;
import com.xuexiang.xutil.data.DateUtils;

import java.math.BigDecimal;

public class Data_PackageRecord  extends Page_Data<Data_PackageRecord> {
    /**
     * carNo : 粤AAAAAA
     * plateColor : Unknow
     * startTime : 1603209600000
     * endTime : 1605887999000
     * totalFee : 30
     * paidTime : 1595532069683
     * parkingLotName : 淮安七星水岸
     * packageName : 测试月卡套餐
     * packageMonth : 1
     * payTypeName : 无
     */

    private String carNo;
    private String plateColor;
    private long startTime;
    private long endTime;
    private BigDecimal totalFee;
    private long paidTime;
    private String parkingLotName;
    private String packageName;
    private int packageMonth;
    private String payTypeName;

    public String getCarNo() {
        return carNo;
    }

    public void setCarNo(String carNo) {
        this.carNo = carNo;
    }

    public String getPlateColor() {
        return plateColor;
    }

    public void setPlateColor(String plateColor) {
        this.plateColor = plateColor;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(BigDecimal totalFee) {
        this.totalFee = totalFee;
    }

    public long getPaidTime() {
        return paidTime;
    }

    public void setPaidTime(long paidTime) {
        this.paidTime = paidTime;
    }

    public String getParkingLotName() {
        return parkingLotName;
    }

    public void setParkingLotName(String parkingLotName) {
        this.parkingLotName = parkingLotName;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public int getPackageMonth() {
        return packageMonth;
    }

    public void setPackageMonth(int packageMonth) {
        this.packageMonth = packageMonth;
    }

    public String getPayTypeName() {
        return payTypeName;
    }

    public void setPayTypeName(String payTypeName) {
        this.payTypeName = payTypeName;
    }

    public String getPackageContent(){
        StringBuffer sb = new StringBuffer();
        sb.append(StringUtils.isEmpty(parkingLotName)?"--":parkingLotName).append("\n\n")
                .append("套餐："+(StringUtils.isEmpty(packageName)?"--":packageName)).append("\n")
                .append("月数："+packageMonth).append("\n")
                .append("生效时间："+ DateUtils.millis2String(startTime,DateUtils.yyyyMMddHHmmss.get())).append("\n")
                .append("失效时间："+DateUtils.millis2String(endTime,DateUtils.yyyyMMddHHmmss.get())).append("\n")
                .append("价格："+"¥"+totalFee.toString());
        return sb.toString();
    }

    public String getPayContent(){
        StringBuffer sb = new StringBuffer();
        sb.append("支付时间："+DateUtils.millis2String(paidTime,DateUtils.yyyyMMddHHmmss.get())).append("\n")
                .append("支付方式："+payTypeName);
        return sb.toString();
    }
}
